import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

class A{
    @Override
    public String toString() {
        return "111";
    }
}
class Animal{
    public String name;
    public int age;


    public void eat(){
        System.out.println(name+"正在吃饭");
    }
}
class Car extends Animal{
    public void catchMouse(){
        System.out.println(name+"正在抓老鼠");
    }
    public void cry(){
        System.out.println(name+"喵喵叫");
    }
}
class Dog extends Animal{
    public void loyal(){
        System.out.println(name+"很忠诚");
    }
    public void dogCry(){
        System.out.println(name+"汪汪叫");
    }
}

public class Test {
    public static void main1(String[] args) {
        System.out.println(new A());
    }

    public static void main(String[] args) {
        Dog dog=new Dog();
        Car car=new Car();
        car.name="卷宝";
        dog.name="烧饼";
        car.cry();
        car.catchMouse();
        car.eat();
        dog.dogCry();
        dog.eat();
        dog.loyal();
    }
}
